1 // TR1 type_traits -*- C++ -*-
3 // Copyright (C) 2004 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 2, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING. If not, write to the Free
18 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 // As a special exception, you may use this file as part of a free software
22 // library without restriction. Specifically, if other files instantiate
23 // templates or use macros or inline functions from this file, or you compile
24 // this file and link it with other files to produce an executable, this
25 // file does not by itself cause the resulting executable to be covered by
26 // the GNU General Public License. This exception does not however
27 // invalidate any other reasons why the executable file might be covered by
28 // the GNU General Public License.
30 /** @file type_traits_fwd.h
31 * This is an internal header file, included by other library headers.
32 * You should not attempt to use it directly.
35 #ifndef _TYPE_TRAITS_FWD_H
36 #define _TYPE_TRAITS_FWD_H 1
45 /// @brief helper classes [4.3].
46 template<typename _Tp, _Tp __v>
47 struct integral_constant;
48 typedef integral_constant<bool, true> true_type;
49 typedef integral_constant<bool, false> false_type;
51 /// @brief primary type categories [4.5.1].
52 template<typename _Tp>
55 template<typename _Tp>
58 template<typename _Tp>
59 struct is_floating_point;
61 template<typename _Tp>
64 template<typename _Tp>
67 template<typename _Tp>
70 template<typename _Tp>
71 struct is_member_object_pointer;
73 template<typename _Tp>
74 struct is_member_function_pointer;
76 template<typename _Tp>
79 template<typename _Tp>
82 template<typename _Tp>
85 template<typename _Tp>
88 /// @brief composite type traits [4.5.2].
89 template<typename _Tp>
92 template<typename _Tp>
93 struct is_fundamental;
95 template<typename _Tp>
98 template<typename _Tp>
101 template<typename _Tp>
104 template<typename _Tp>
105 struct is_member_pointer;
108 template<typename _Tp>
109 struct __is_union_or_class;
111 /// @brief type properties [4.5.3].
112 template<typename _Tp>
115 template<typename _Tp>
118 template<typename _Tp>
121 template<typename _Tp>
124 template<typename _Tp>
125 struct is_polymorphic;
127 template<typename _Tp>
130 template<typename _Tp>
131 struct has_trivial_constructor;
133 template<typename _Tp>
134 struct has_trivial_copy;
136 template<typename _Tp>
137 struct has_trivial_assign;
139 template<typename _Tp>
140 struct has_trivial_destructor;
142 template<typename _Tp>
143 struct has_nothrow_constructor;
145 template<typename _Tp>
146 struct has_nothrow_copy;
148 template<typename _Tp>
149 struct has_nothrow_assign;
151 template<typename _Tp>
152 struct has_virtual_destructor;
154 template<typename _Tp>
157 template<typename _Tp>
160 template<typename _Tp>
163 template<typename _Tp>
166 template<typename _Tp, unsigned _Uint = 0>
169 /// @brief relationships between types [4.6].
170 template<typename _Tp, typename _Up>
173 template<typename _From, typename _To>
174 struct is_convertible;
176 template<typename _Base, typename _Derived>
179 /// @brief const-volatile modifications [4.7.1].
180 template<typename _Tp>
183 template<typename _Tp>
184 struct remove_volatile;
186 template<typename _Tp>
189 template<typename _Tp>
192 template<typename _Tp>
195 template<typename _Tp>
198 /// @brief reference modifications [4.7.2].
199 template<typename _Tp>
200 struct remove_reference;
202 template<typename _Tp>
203 struct add_reference;
205 /// @brief array modififications [4.7.3].
206 template<typename _Tp>
207 struct remove_extent;
209 template<typename _Tp>
210 struct remove_all_extents;
212 /// @brief pointer modifications [4.7.4].
213 template<typename _Tp>
214 struct remove_pointer;
216 template<typename _Tp>
219 /// @brief other transformations [4.8].
220 template<std::size_t _Len, std::size_t _Align>
221 struct aligned_storage;